package guiTest;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JSlider;
import javax.swing.plaf.metal.MetalSliderUI;

public class MySliderUI extends MetalSliderUI
{
	Color backgroundColor;
	JSlider theSlider;
	
	public MySliderUI() 
	{
		super();
		highlightColor = Color.ORANGE;
		darkShadowColor = Color.ORANGE;
		//theSlider = arg;
		//setHighlightColor()
	}
	
	public MySliderUI(JSlider arg) 
	{
		super();
		theSlider = arg;
		//setHighlightColor()
	}
	
	public void setBackgroundColor(Color newColor)
	{
		backgroundColor = newColor;
	}
	
	public Color getBackgroundColor()
	{
		return backgroundColor;
	}

	@Override
	public void paintTrack(Graphics g)
	{
		
		/*g.setColor(Color.GREEN);
		g.fillRect(0, 0, slider.getWidth() + 10, slider.getHeight() + 10);*/
		//g.setColor(Color.GREEN);
		//g.drawRect(0, 0, slider.getWidth() - 1, slider.getHeight() - 1);
		
		//int elapsedIndicatorWidth = theSlider.getWidth() / 4;
		//setBackground(Color.MAGENTA);
		super.paintTrack(g);
		//paintThumb(g);
		/*
		for (int i = 3; i < thumbRect.getX(); i = i + (elapsedIndicatorWidth * 2)) 
		{
			g.setColor(new Color(170, 170, 150));
			g.fillRect(i, 3, elapsedIndicatorWidth, slider.getHeight() - (3 * 2));
		}*/
	}
}
